import http from 'service/util/http.js'

export default {
    // 申请借款
    borrowApply(data) {
        return http.post('/order/borrow/apply', data, ['userId', 'productId', 'redId', 'couponId'])
    },
    // 提交借款申请
    borrowSubmit(data) {
        return http.post('/order/borrow/submit', data, ['userId'])
    },
    // 签约
    sign(data) {
        return http.post('/order/sign', data, ['userId'])
    },
    // 借款列表
    list(data) {
        return http.post('/order/list', data, ['userId', 'pageNo', 'pageSize'])
    },
    // 借款详情
    detail(data) {
        return http.post('/order/detail', data, ['userId'])
    },
    // 用户还款
    repay(data) {
        return http.post('/order/repay', data, ['userId', 'orderId'])
    }
}
